package booroo.basic;

public class J05_Patterns {

	public static void main(String[] args) {
		// Pattern 1
		int i = 1;
		int j = 1;
		while (j <= 6){
			while(i <= j ){
				System.out.print(i + " ");
				i++;
			}
			System.out.println();
			j++;
			i = 1;
			}
		System.out.println();
		
		// Pattern 2
		int k = 1;
		int l = 6;
		while (l >= 1){
			while (k <= l){
				System.out.print(k + " ");
				k++;
				}
			System.out.println();
			--l;
			k = 1;
			}
		
		// Pattern 3
		int m = 1;
		int n = 1;
		int o = 0;
		
		while ( m <= 6){
			while (n < (7-m)){
				System.out.print("  ");
				n++;
			}
			o = m;
			while(o >= 1){
				System.out.print(o + " ");
				o--;
			}
			System.out.println();
			m++;
			n = 1;
			}
		System.out.println();
		
		// pattern 4
		
		
	}	
}

